<template>
  <Row>
    <Col>
    <div style="background:#eee;padding: 20px">
      <Card :bordered="false">
        <p slot="title">商家列表</p>
        <Table border :columns="columns1" :data="storeinfo"></Table>
      </Card>
    </div>
    </Col>
  </Row>
</template>
<script>
  import axios from 'axios'
  export default {
    data () {
      return {
        columns1: [
          {
            title: 'storeId',
            key: 'storeId'
          },
          {
            title: '店铺名称',
            key: 'storeName'
          },
          {
            title: '店铺地址',
            key: 'address'
          },
          {
            title: '所在城市代码',
            key: 'citycode'
          },
          {
            title: '营业时间',
            key: 'shophours'
          },
          {
            title: '起送价',
            key: 'startprice'
          },
          {
            title: '配送费',
            key: 'transportprice'
          },
          {
            title: '店铺logo',
            key: 'storelogo'
          },
          {
            title: '店铺公告',
            key: 'noteice'
          },
          {
            title: '优惠信息',
            key: 'cheapennoteice'
          },
          {
            title: '新用户优惠',
            key: 'newusernoteice'
          },
          {
            title: '联系电话',
            key: 'tel'
          },
          {
            title: '关联账号',
            key: 'uaccount'
          }
        ],
        storeinfo: []
      }
    },
    created: function () {
      var that = this
      axios.get('http://localhost/waimai/public/api/getstoreinfo')
        .then(function (response) {
          console.log(response.data.data)
          that.storeinfo = response.data.data
        })
          .catch(function (error) {
            console.log(error)
          })
    }
  }
</script>
